// import { createApp } from "vue";
import './style.css'
import App from './App.vue'

// createApp(App).mount('#app')

// Sentry官网: https://none-9p3.sentry.io/; 创建账号zhang，邮箱@163
// 引入监控系统(Sentry): yarn add @sentry/vue @sentry/tracing

import { createApp } from "vue";
import { createRouter } from "vue-router";
import * as Sentry from "@sentry/vue";
import { BrowserTracing } from "@sentry/tracing";

const app = createApp(App);
const router = createRouter({
  // ...
});

Sentry.init({
  app,
  dsn: "https://0fe54291bb8d4026b01bf08ba589658a@o4504733999955968.ingest.sentry.io/4504734003298304", // 项目的地址，告诉SDK将事件发送到哪里
  debug: true, // 打开或关闭调试模式。开启就会把信息打印到控制台上面
  integrations: [
    new BrowserTracing({
      routingInstrumentation: Sentry.vueRouterInstrumentation(router),
      tracePropagationTargets: ["localhost", "my-site-url.com", /^\//],
    }),
  ],
  // Set tracesSampleRate to 1.0 to capture 100%
  // of transactions for performance monitoring.
  // We recommend adjusting this value in production
  tracesSampleRate: 1.0,
});

app.use(router);
app.mount("#app");